\hypertarget{classdev_1_1net_1_1_tcp_connection_output_stream}{}\section{dev\+:\+:net\+:\+:Tcp\+Connection\+Output\+Stream Class Reference}
\label{classdev_1_1net_1_1_tcp_connection_output_stream}\index{dev\+::net\+::\+Tcp\+Connection\+Output\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Output\+Stream}}


Tcp连接输出流  




{\ttfamily \#include $<$Tcp\+Connection\+Output\+Stream.\+hpp$>$}

Inheritance diagram for dev\+:\+:net\+:\+:Tcp\+Connection\+Output\+Stream\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classdev_1_1net_1_1_tcp_connection_output_stream}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classdev_1_1net_1_1_tcp_connection_output_stream_a2d80e016dc38f11734aa2bb1af110384}{}typedef \hyperlink{classdev_1_1net_1_1_tcp_connection_output_stream}{Tcp\+Connection\+Output\+Stream} {\bfseries self}\label{classdev_1_1net_1_1_tcp_connection_output_stream_a2d80e016dc38f11734aa2bb1af110384}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classdev_1_1net_1_1_tcp_connection_output_stream_a63d1fc27a69ab5d7386c5dc280fa331d}{}{\bfseries Tcp\+Connection\+Output\+Stream} (\hyperlink{classdev_1_1net_1_1_socket}{Socket} \&sock, size\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_stream_a3ae773ddc1f353c00cebf98eb1a9d19e}{size}=1024 $\ast$64)\label{classdev_1_1net_1_1_tcp_connection_output_stream_a63d1fc27a69ab5d7386c5dc280fa331d}

\item 
\hypertarget{classdev_1_1net_1_1_tcp_connection_output_stream_a23a23583a097865c4a967612ca10a0a1}{}{\bfseries Tcp\+Connection\+Output\+Stream} (\hyperlink{classdev_1_1net_1_1_socket}{Socket} \&sock, boost\+::shared\+\_\+array$<$ char $>$ buff, size\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_stream_a3ae773ddc1f353c00cebf98eb1a9d19e}{size}=1024 $\ast$64)\label{classdev_1_1net_1_1_tcp_connection_output_stream_a23a23583a097865c4a967612ca10a0a1}

\item 
ssize\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_output_stream_a1bdd407180d473f7a82f99d46df44827}{flush} (void)
\begin{DoxyCompactList}\small\item\em 把流的数据写入套接字 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classdev_1_1net_1_1_tcp_connection_output_stream_acbaa6bef9ae564e21a61f3eba97ac782}{write} (const char $\ast$buf, size\+\_\+t length)
\begin{DoxyCompactList}\small\item\em 向流中写入数据 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1_tcp_connection_output_stream_a456027da3592e7b42d8c73dc7dc24799}{}{\footnotesize template$<$typename T $>$ }\\\hyperlink{classdev_1_1net_1_1_tcp_connection_output_stream}{self} \& \hyperlink{classdev_1_1net_1_1_tcp_connection_output_stream_a456027da3592e7b42d8c73dc7dc24799}{operator$<$$<$} (T \&x)\label{classdev_1_1net_1_1_tcp_connection_output_stream_a456027da3592e7b42d8c73dc7dc24799}

\begin{DoxyCompactList}\small\item\em $<$$<$运算符重载,写入时请先判断流时候有足够的空间 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Tcp连接输出流 

\subsection{Member Function Documentation}
\hypertarget{classdev_1_1net_1_1_tcp_connection_output_stream_a1bdd407180d473f7a82f99d46df44827}{}\index{dev\+::net\+::\+Tcp\+Connection\+Output\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Output\+Stream}!flush@{flush}}
\index{flush@{flush}!dev\+::net\+::\+Tcp\+Connection\+Output\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Output\+Stream}}
\subsubsection[{flush(void)}]{\setlength{\rightskip}{0pt plus 5cm}ssize\+\_\+t Tcp\+Connection\+Output\+Stream\+::flush (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classdev_1_1net_1_1_tcp_connection_output_stream_a1bdd407180d473f7a82f99d46df44827}


把流的数据写入套接字 

\begin{DoxyReturn}{Returns}
失败返回\+S\+O\+C\+K\+E\+T\+\_\+\+E\+R\+R\+O\+R,成功返回写入的字节数 
\end{DoxyReturn}
\hypertarget{classdev_1_1net_1_1_tcp_connection_output_stream_acbaa6bef9ae564e21a61f3eba97ac782}{}\index{dev\+::net\+::\+Tcp\+Connection\+Output\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Output\+Stream}!write@{write}}
\index{write@{write}!dev\+::net\+::\+Tcp\+Connection\+Output\+Stream@{dev\+::net\+::\+Tcp\+Connection\+Output\+Stream}}
\subsubsection[{write(const char $\ast$buf, size\+\_\+t length)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t dev\+::net\+::\+Tcp\+Connection\+Output\+Stream\+::write (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{buf, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classdev_1_1net_1_1_tcp_connection_output_stream_acbaa6bef9ae564e21a61f3eba97ac782}


向流中写入数据 


\begin{DoxyParams}{Parameters}
{\em buf} & 缓存 \\
\hline
{\em length} & 缓存大小 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
写入流的数据大小 
\end{DoxyReturn}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
dev/dev/net/Tcp\+Connection\+Output\+Stream.\+hpp\item 
dev/src/net/Tcp\+Connection\+Output\+Stream.\+cpp\end{DoxyCompactItemize}
